package com.sofwin.service.impl.contents;

import com.sofwin.mapper.CCompetitionMapper;
import com.sofwin.pojo.CCompetitionExample;
import com.sofwin.pojo.CCompetitionWithBLOBs;
import com.sofwin.service.contents.IndustryCompetitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: ssm-parent
 * @description: 行业及市场竞争业务实现类
 * @author: Mr.lzk
 * @create: 2021-04-27 11:21
 * @Version 1.0
 **/
@Service
public class IndustryCompetitionServiceImpl implements IndustryCompetitionService {
    @Autowired
    private CCompetitionMapper mapper;
    /**
     * @Description: 根据公司id查询行业及市场竞争信息
     * @Author: Mr.lzk
     * @Date: 2021/4/27 11:49
     * @Param: * @param companyId:
     * @Return: * @return: com.sofwin.pojo.CCompetitionWithBLOBs
     **/
    @Override
    public CCompetitionWithBLOBs selectIndustryCompetition(Integer companyId) {
        CCompetitionExample example = new CCompetitionExample();
        CCompetitionExample.Criteria criteria = example.createCriteria();
        criteria.andCompanyIdEqualTo(companyId);
        return mapper.selectByExampleWithBLOBs(example).get(0);
    }
}
